import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({width: 1920, height: 1400});
// const url = 'http://192.168.127.117:18087/hussarword/#/wordEditor?id=1016266838507790336&params=%7B%22docId%22%3A%221963764361301450752%22,%22groupId%22%3A%221002600174402674688%22,%22modelName%22%3A%22%E6%97%A0%E6%A0%87%E9%A2%98%E6%96%87%E6%A1%A3%22,%22autoSplit%22%3Afalse%7D&systemParams=%7B%22showAnnotations%22%3A1,%22showSeal%22%3A1%7D'
// const url ='https://baijiahao.baidu.com/s?id=1842399274135417629'
const url = 'http://192.168.127.117:18087/hussarword/#/wordEditor?id=1963406733853450240&params=%7B%22docId%22%3A%221963406734042193920%22,%22groupId%22%3A%221004686819729874944%22,%22modelName%22%3A%2280%E9%A1%B5%E7%BA%AF%E6%96%87%E6%9C%AC%22,%22autoSplit%22%3Afalse%7D&systemParams=%7B%22showAnnotations%22%3A1,%22showSeal%22%3A1%7D'
await page.goto(url);
// await page.waitForSelector('.h-word-container')
await setTimeout(async () => {
    await page.pdf({path: 'test2.pdf'})
    await browser.close();
}, 18000)
